{% extends "base.html" %}

{% load staticfiles %}


{% block content %}
<head>
  <meta charset="utf-8">
  <title>Hotel Reviews & Pics</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="description" content="">
  <meta name="author" content="">
</head>

<body>
<div class="container">
	<div class="row clearfix">
		<div class="col-md-12 column">
			<div class="carousel slide" id="carousel-970874">
				<ol class="carousel-indicators">
					<li class="active" data-slide-to="0" data-target="#carousel-970874">
					</li>
					<li data-slide-to="1" data-target="#carousel-970874">
					</li>
					<li data-slide-to="2" data-target="#carousel-970874">
					</li>
				</ol>
				<div class="carousel-inner">
					

					<div class="item active">
						<img alt="" src="{% static 'hotels_pics/booking.jpg'%}" />
						<div class="carousel-caption">
							<h4>
								Booking.Com
							</h4>
							<p>
								Description
							</p>
						</div>
					</div>

					{% if hotel_pics %}
						{% for pic in hotel_pics %}

							<div class="item">
								<img alt="" src="{% static ''%}{{ pic.image.name }}"/>
								<div class="carousel-caption">
									<h4>
										{{ pic.title }}
									</h4>
									<p>
										{{ pic.description }}
									</p>
								</div>
							</div>
							
						{% endfor %}
					{% endif %}

				</div> <a class="left carousel-control" href="#carousel-970874" data-slide="prev"><span class="glyphicon glyphicon-chevron-left"></span></a> <a class="right carousel-control" href="#carousel-970874" data-slide="next"><span class="glyphicon glyphicon-chevron-right"></span></a>
			</div>
		</div>
	</div>
</div>



<div class="container">
	{% for rate in hotel_rates %}
		<div class="row clearfix">
			<div class="col-md-12 column">
				<dl>
					<dt>
						Title
					</dt>	
					<dd>
						{{ rate.title }} By {{ rate.user_id.username }}
					</dd>

					<dt>
						Rate
					</dt>
					<dd>
						{{ rate.rate }} 
					</dd>

					<dt>
						Comment
					</dt>
					<dd>
						{{ rate.body }}
					</dd>
					
				</dl>
			</div>
		</div>	
	{% endfor %}
</div>
<div class="container">

	<form method='POST' action='/rates/addrate/'>{% csrf_token %}
		<table>
			{{ rate_form.as_table }}
		</table>
		<input type="hidden" name="hotel_id" value="{{ hotel_id }}">
		<input type="submit" value="Add Comment">
	</form>
</div>
</body>
{% endblock %}


